package com.study.listener;

import com.study.event.LogSaveEvent;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.EventListener;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class LogEventListener2 {

    @Async
    @EventListener
    public void saveLog(LogSaveEvent logSaveEvent) {
        log.info("LogEventListener: " + logSaveEvent.getLogPojo().getName());
    }
}
